home *** CD-ROM | disk | FTP | other *** search
- ;; $VER: JYPInstall 1.3 (22-Jan-94)
- ;; $Id: Install,v 1.3 94/01/22 17:18:51 jyp Exp $
- (set nom-prog @app-name)
-
- ;; *
- ;; * Ce script installe n'importe quel binaire dont la livraison est
- ;; * de la forme suivante (## est le nom du programme à installer)
- ;; *
- ;; <racine>----------<##>
- ;; |-<##.info>
- ;; |----Docs
- ;; | |----<##.Français>
- ;; | |----<##.Deutsch>
- ;; | |----<##.Português>
- ;; | \----<##.English>
- ;; |----Catalogs
- ;; |----<Français>---<##.catalog>
- ;; |----<Deutsch>----<##.catalog>
- ;; |----<Português>--<##.catalog>
- ;; \----<English>----<##.catalog>
-
- ;; *
- ;; * définition des msg utiliser (tous commencent par 'M')
- ;; *
-
- ;; *----------------------------------------- Français
- (if (= @language "français")
- (
- (set langue-defaut 0)
- (set Msale-kick
- "Vous devez posséder la version 2.04 ou supérieure du Kickstart.")
- (set Mpas-2.1
- "Vous devez possedez la version 2.1 ou supérieure du Workbench.")
-
- (set Mchoix-langue
- (cat "Choisissez les langues à installer.\n"
- "NOTEZ que le français est inclus dans le binaire de"
- " " nom-prog "."
- ))
- (set Maide-choix-langue
- (cat nom-prog " peut tourner dans différentes langues,"
- " choississez celle(s) que vous voulez pour la"
- " documentation et le programme lui-même."))
-
- (set Mdestination
- (cat "Indiquez le répertoire dans lequel"
- " " nom-prog " va être installé."))
- (set Maide-destination
- (cat "Ce programme va installer " nom-prog ", spécifiez"
- " l'endroit où le binaire " nom-prog ", son icône et"
- " sa documentation doivent être copiés."))
- )
- )
- ;; *----------------------------------------- Deutsch
- (if (= @language "deutsch")
- (
- (set langue-defaut 1)
- (set Msale-kick
- (cat nom-prog " benötigt mindestens Kickstart 2.04"))
- (set Mpas-2.1
- (cat nom-prog " benötigt mindestens Workbench 2.1"))
-
- (set Mchoix-langue
- (cat "Bitte geben Sie an, welche Sprachen installiert werden"
- " sollen.\n"
- "Bemerken Sie, daß die französiche Sprache schon in"
- " " nom-prog " Program ist."
- ))
- (set Maide-choix-langue
- (cat nom-prog " kann mit mehrere Sprachen laufen,"
- " geben Sie in welchen Sprachen, die Sie für Anleitung und"
- "den Program selbst wollen."))
-
- (set Mdestination
- (cat "Bitte geben Sie an, in welchem Verzeichnis"
- " " nom-prog " installiert werden soll."))
- (set Maide-destination
- (cat "Dises Program wird " nom-prog " installieren, geben Sie"
- " in welchem Verzeichnis " nom-prog ", sein Ikon und"
- " Anleitung installiert werden soll."))
- )
- )
- ;; *----------------------------------------- Português
- (if (= @language "português")
- (
- (set langue-defaut 3)
- (abort "On n'attend la traduction de Ricardo.")
- (set Msale-kick
- "Vous devez posséder la version 2.04 ou supérieure du Kickstart.")
- (set Mpas-2.1
- "Vous devez possedez la version 2.1 ou supérieure du Workbench.")
-
- (set Mchoix-langue
- (cat "Choisissez les langues à installer.\n"
- "NOTEZ que le français est inclus dans le binaire de"
- " " nom-prog "."
- ))
- (set Maide-choix-langue
- (cat nom-prog " peut tourner dans différentes langues,"
- " choississez celle(s) que vous voulez pour la"
- " documentation et le programme lui-même."))
-
- (set Mdestination
- (cat "Indiquez le répertoire dans lequel"
- " " nom-prog " va être installé."))
- (set Maide-destination
- (cat "Ce programme va installer " nom-prog ", spécifiez"
- " l'endroit où le binaire " nom-prog ", son icône et"
- " sa documentation doivent être copiés."))
- )
- )
- ;; *----------------------------------------- English
- (if (= @language "english")
- (
- (set langue-defaut 3)
- (set Msale-kick
- "You must run a Kickstart 2.04 ou higher.")
- (set Mpas-2.1
- "You must own a Workbench version 2.1 ou higher.")
-
- (set Mchoix-langue
- (cat "Choose the languages to be installed.\n"
- "NOTE that the french language is included in"
- " " nom-prog " binary."
- ))
- (set Maide-choix-langue
- (cat nom-prog " can run in different languages,"
- " choose which one(s) you want for documentation and"
- " the program itself."))
-
- (set Mdestination
- (cat "Indicate the directory in which"
- " " nom-prog " will be installed."))
- (set Maide-destination
- (cat "This program will install " nom-prog ", specify"
- " where to put the binary " nom-prog ", its icon and"
- " its documentation."))
- )
- )
- ;; *--------------------------------------
- ;; * Début
- ;; *--------------------------------------
- (set niveau-deb @user-level)
- (complete 0)
- (set @default-dest "SYS:")
- ;; *
- ;; * Premièrement vérifier envirionnement corret
- ;; *
- (if (> (* 37 65536) (getversion "exec.library" (resident)))
- (abort Msale-kick)
- )
- (if (= "" (getassign "Locale"))
- (abort Mpas-2.1)
- )
- (welcome)
- ;; *
- ;; * Choix des langues à installer
- ;; *
- (user 2)
- (set lang 0)
- (while (= lang 0)
- (set lang (askoptions (prompt Mchoix-langue)
- (help Maide-choix-langue)
- (choices "Français"
- "Deutsch"
- "Português"
- "English")
- (default (shiftleft 1 langue-defaut))))
- )
- ;; *
- ;; * choix de la destination (prg + doc)
- ;; *
- (set destination (askdir (prompt Mdestination)
- (help Maide-destination)
- (default @default-dest)))
- (user niveau-deb)
- ;; *
- ;; * Tous est paré, on commence les copies
- ;; *
- (complete 10)
- (set rep-livr (pathonly (pathonly @icon))) ; racine de l'arbo livraison
-
- ;; * le binaire
- (copyfiles (source (tackon rep-livr nom-prog))
- (dest destination)
- (infos)
- (optional "force" "askuser")
- )
- (complete 50)
- ;; * les catalogues + docs
- (makedir (tackon destination "Docs")
- (infos))
- (set n 0)
- (while (set nom-langue (select n "Français"
- "Deutsch"
- "Português"
- "English"
- ""))
- (
- (if (in lang n) ;langue spécifiée et !français
- (
- (if (<> 0 n)
- (
- ;; *
- ;; * catalogue
- ;; *
- (set rep-dest (tackon "Locale:Catalogs" nom-langue))
- (set rep-src (tackon (tackon
- rep-livr "Catalogs")
- nom-langue))
- (makedir rep-dest)
- (copyfiles (source (tackon rep-src (cat nom-prog ".catalog")))
- (dest rep-dest)
- (optional "force" "askuser"))
- )
- )
- ;; *
- ;; * documentation
- ;; *
- (set rep-src (tackon rep-livr "docs"))
- (copyfiles (source (tackon rep-src (cat nom-prog "." nom-langue)))
- (dest (tackon destination "Docs"))
- (infos)
- (optional "force" "askuser"))
- )
- )
- (set n (+ n 1))
- )
- )
- (set @default-dest destination)
- (complete 100)
-